package cn.zaichi.edu.excelcommon.exception;

import cn.zaichi.edu.excelcommon.error.ExcelExceptionEnum;

/**
 * 异常
 */
public class ExcelException extends RuntimeException {
    private int status = 500;
    private String msg;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public ExcelException(String msg,int status){
        super(msg);
        this.msg=msg;
        this.status=status;
    }
    public ExcelException(ExcelExceptionEnum exceptionEnum) {
        super(exceptionEnum.getMsg());
        this.status = exceptionEnum.getStatus();
        this.msg=exceptionEnum.getMsg();
    }

    public ExcelException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
